home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / fileobuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-21  |  1.6 KB  |  56 lines

  1. /* unix_file_obuffer.h
  2.  
  3.    Output buffer for unix filesystems written by Tobias Bading
  4.    (bading@cs.tu-berlin.edu)
  5.  
  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2 of the License, or
  9.    (at your option) any later version.
  10.  
  11.    This program is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with this program; if not, write to the Free Software
  18.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  19.  
  20. #ifndef UNIX_FILE_OBUFFER_H
  21. #define UNIX_FILE_OBUFFER_H
  22.  
  23. #include "obuffer.h"
  24.  
  25. // An audio output class for raw pcm output
  26. // or if ULAW is defined:
  27. // An audio output class for 8-bit ulaw output at 8 kHz:
  28. class FileObuffer : public Obuffer
  29. {
  30. private:
  31. #ifdef ULAW
  32.   ulawsample buffer[OBUFFERSIZE];
  33.   ulawsample *bufferp[MAXCHANNELS];
  34. #else
  35.   int16 buffer[OBUFFERSIZE];
  36.   int16 *bufferp[MAXCHANNELS];
  37. #endif
  38.   uint32 channels;
  39.  
  40. public:
  41.     FileObuffer (uint32 number_of_channels);
  42.        ~FileObuffer (void) {}
  43.   void    append (uint32 channel, int16 value);
  44.   void    write_buffer (int fd);
  45.  
  46. #ifdef SEEK_STOP
  47.   void clear_buffer(void);
  48.   void set_stop_flag(void);
  49. #endif
  50.  
  51. };
  52.  
  53. Obuffer *create_stdout_obuffer(MPEG_Args *maplay_args);
  54.  
  55. #endif // UNIX_FILE_OBUFFER_H
  56.